package com.jnu.hospitalexamination.entity.vo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.jnu.hospitalexamination.entity.Orders;
import lombok.Data;

import java.util.Date;
import java.util.Objects;

@Data
public class OrdersVO {
    /**
     * 订单编号
     */
    private Integer orderid;

    /**
     * 预约日期
     */
    @JsonFormat(pattern = "yyyy年MM月dd日",timezone = "GMT+8")
    private Date orderdate;

    /**
     * 客户编号
     */
    private Integer userid;

    /**
     * 所属医院编号
     */
    private Integer hpid;

    /**
     * 所属套餐编号
     */
    private Integer smid;

    /**
     * 订单状态（1：未归档；2：已归档）
     */
    private Integer state;

    /**
     * 套餐名称
     */
    private String name;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        OrdersVO ordersVO = (OrdersVO) o;
        return Objects.equals(orderid, ordersVO.orderid) && Objects.equals(orderdate, ordersVO.orderdate) && Objects.equals(userid, ordersVO.userid) && Objects.equals(hpid, ordersVO.hpid) && Objects.equals(smid, ordersVO.smid) && Objects.equals(state, ordersVO.state) && Objects.equals(name, ordersVO.name);
    }

    @Override
    public int hashCode() {
        return Objects.hash(orderid, orderdate, userid, hpid, smid, state, name);
    }

}
